﻿<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="shortcut icon" href=" /favicon.ico" />
    <title>校园支付 - 帮同学、朋友充值</title>
    <link href="css/main.css" rel="stylesheet" type="text/css" media="all" />
    <link href="css/dialog.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery.1.6.2_mini.js" type="text/javascript"></script>
    <script src="js/dialog.js" type="text/javascript"></script>
    <script src="js/common.js" type="text/javascript"></script>
    <script src="js/service.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            //获取当前登录用户信息
            //GetCurrentUserBaseInfo();

            var _payVal = 0;
            if ($.QueryString()['payval'])
                _payVal = parseInt($.QueryString()['payval'], 10);
            $('#font_Payval').html(_payVal);

            var _friendName = '';
            if ($.QueryString()['payforName'])
                _friendName = $.QueryString()['payforName'];
            $('#txt_TargetName').val(_friendName);

            $('#btn_Next').click(function () {
                var friendName = $('#txt_TargetName').val().Trim();
                if (friendName == '') {
                    Alert('请输入您想帮TA充值的人的姓名！');
                    return;
                }
                $('#div_SameNameAndBankBox').show();
                //获取同名同姓人数据列表
                GetSameNameUserList(friendName);
                //获取银行列表
                GetBanks2();
            });
            
            $('#btn_PaySubmit').click(function () {
                var orderBank = $("input[name='radio_Bank']:checked").val();
                if (typeof(orderBank) == 'undefined') {
                    orderBank = $("#sel_OtherBank").val();
                }
                if (orderBank == '') {
                    Alert('请选择支付银行!');
                    return;                    
                }

                //alert(feeItems.join(','));
                
                $('#orderName').val('缴费');
                $('#orderInfo').val('帮别人缴费');
                $('#orderPrice').val(<%=request.getAttribute("orderPrice") %>);
                $('#orderBank').val(orderBank);
                $('#payForm').submit();
            });            
        });    
    </script>
</head>
<body>
    <!--头部区域-->
    <div id="header">
        <!-- <a href="help.html" target="_blank" title="帮助"></a> -->
        <a href="quit.action" title="退出"></a>
    </div>
    <!--用户信息区域-->
    <div id="userBlock">
        <!--用户头像-->
        <div class="headIconBox">
            <img id="img_UserIcon" src="<%=request.getAttribute("userIcon") %>" alt="用户头像" />
            <p title="点击更改头像"></p>
        </div>
        <!--用户个人账户信息-->
        <div class="baseInfoBox">
            <ul>
                <li id="li_UserName"><%=request.getAttribute("userName") %></li>
                <li id="li_UserNo">学  号：<%=request.getAttribute("userNo") %></li>
                <li class="last" id="li_LastLoginTime">最后一次登录时间：<%=request.getAttribute("lastLoginTime") %></li>
            </ul>
        </div> 
    </div>

    <div class="block">
        <p class="bangLogo"></p>
        <div class="blockTitle">你正在帮你好友的一卡通充值<font id="font_Payval"><%=request.getAttribute("orderPrice") %></font>元</div>
        <div class="blockBox">
            <ul>
                <li>
                    <label>请输入你好友的姓名：</label>
                    <input type="text" name="txt_TargetName" id="txt_TargetName" value="" maxlength="16" class="short" title="请输入您的好友的姓名" />
                </li>
                <li>
                    <label>留言：</label>
                    <input type="text" name="txt_MsgContent" id="txt_MsgContent" value="" maxlength="50" title="请输入留言信息" />
                </li>
                <li>
                    <label>验证码：</label>
                    <input type="text" name="txt_VerifyCode" id="txt_VerifyCode" value="" maxlength="4" class="short" title="请输入验证码" />
                    <img src="images/login_v_code.jpg" alt="验证码" />
                </li>
                <li class="last">
                    <label>&nbsp;</label>
                    <input type="button" name="btn_Next" id="btn_Next" value="继续" title="点击继续" />
                </li>
            </ul>
        </div>
    </div>

    <div class="block" id="div_SameNameAndBankBox" style="display:none;">
        <div class="blockTitle">请在下列同名同姓的用户中选择你的朋友</div>
        <div class="userBox" id="div_SameNameBox">
            <ul id="ul_SameNameBox"></ul>
        </div>
        
        <div class="userBox">
            <ul>
                <li class="last">
                    <input type="button" name="btn_PaySubmit" id="btn_PaySubmit" value="帮TA充值" title="点击帮TA充值" />
                </li>
            </ul>
        </div>
    </div>
    
    <form id="payForm" action="pay.action" method="post" target="_blank">
    	<input id="orderName" name="orderName" type="hidden" />
    	<input id="orderInfo" name="orderInfo" type="hidden" />
    	<input id="orderPrice" name="orderPrice" type="hidden" />
    	<input id="orderBank" name="orderBank" type="hidden" />
    </form>
   

    <!--底部版权信息-->
    <!--<div id="footer">
        底部版权信息
    </div>-->
    <script type="text/javascript" src="js/footer.js"></script>
</body>
</html>